package io.renren.modules.shop.dao;

import io.renren.modules.shop.entity.ProductDetailEntity;
import io.renren.modules.shop.entity.ProductDetailRackEntity;
import io.renren.modules.shop.entity.ProductEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.shop.entity.ProductPictureEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 *
 *
 * @author Yangqianyong
 * @email sunlightcs@gmail.com
 * @date 2021-11-17 15:35:51
 */
@Mapper
public interface ProductDao extends BaseMapper<ProductEntity> {

    ProductDetailEntity getProductDetailById(Long id);

    List<ProductPictureEntity> getProductPicture(Long id);

    List<ProductDetailEntity> getProductBySearch(String search);

    List<ProductDetailEntity> getProductBySearchOne(String search,Integer rack);

    List<ProductDetailRackEntity> getMerchant(Long id);

    List<ProductDetailRackEntity> getMerchantRack(Long id,Integer rack);

    List<ProductDetailEntity> getProductByCategory(Integer categoryId);

    List<ProductDetailEntity> getProductByCategoryOne(Integer categoryId,Integer rack);
}
